import React from 'react';
import {connect} from 'dva';
import styles from './index.less';
import { TextareaItem } from 'antd-mobile';
/**
 * 评论，数据与Props绑定
 */
class cCurrentOwner extends React.Component {
  constructor(props) {
    super(props);

    this.state = {

    }
  }

  onChange = (value, key) => {
    this.props.dispatch({type: 'detail/changeMast', payload: {
      [key]: value
    }});
  }

  render(){
    return (
      <div className={styles.baseList}>
        <div className={`${styles.item} ${styles.blockItem}`}>
          <div>
            <TextareaItem
              autoHeight
              rows={3}
              onChange={(value) => this.onChange(value, 'remark')}
              placeholder="please input content"
              clear
            />
          </div>
        </div>
      </div>
    )
  }
}


function mapStateToProps(state) {
  return {
    ...state.detail
  }
}
export default connect(mapStateToProps)(cCurrentOwner);
